/*
 * Copyright (c) 2019. ascend 版权所有禁止转载。
 */

package cn.edu.zua.demo18.jpa;

import cn.edu.zua.demo18.base.BaseRepository;
import cn.edu.zua.demo18.entity.SysUser;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * 说明：
 *
 * @author ascend
 * 2019/1/30 15:03
 */
@Repository
public interface SysUserJpa extends BaseRepository<SysUser, String> {
    @Query(value = "select * from sys_user where lower(user_name) = lower(?1)", nativeQuery = true)
    SysUser findByUserNameCaseInsensitive(@Param("username") String userName);
}
